package com.mzy.linear_struct.subject;

/**
 * @Author: mizy3
 * @Date: 2024/07/25/下午3:35
 * @Description:
 */
public class ThreeSplitNumber {

    public static void main(String[] args) {
        long number = 8;

        long num = number;

        StringBuilder answerBuilder = new StringBuilder();
        int count = 0;
        while (num != 0) {
            long n = num % 10;
            if (count % 3 == 0) {
                answerBuilder.insert(0, ".");
            }
            answerBuilder.insert(0,n);
            num /= 10;
            count++;
        }
        answerBuilder.delete(answerBuilder.length() - 1, answerBuilder.length());
        System.out.println(answerBuilder);
    }
}
